home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / awe2-0_1.lha / awe2-0.1 / Src / RCS / Awesime.h,v < prev    next >
Text File  |  1989-02-23  |  3KB  |  172 lines

  1. head     3.2;
  2. branch   ;
  3. access   ;
  4. symbols  ;
  5. locks    grunwald:3.2; strict;
  6. comment  @ * @;
  7.  
  8.  
  9. 3.2
  10. date     89.02.20.15.31.48;  author grunwald;  state Exp;
  11. branches ;
  12. next     3.1;
  13.  
  14. 3.1
  15. date     88.12.20.13.49.29;  author grunwald;  state Exp;
  16. branches ;
  17. next     1.2;
  18.  
  19. 1.2
  20. date     88.10.30.13.05.29;  author grunwald;  state Exp;
  21. branches ;
  22. next     1.1;
  23.  
  24. 1.1
  25. date     88.09.18.16.42.01;  author grunwald;  state Exp;
  26. branches ;
  27. next     ;
  28.  
  29.  
  30. desc
  31. @@
  32.  
  33.  
  34. 3.2
  35. log
  36. @Start using Gnu library heaps for schedulers
  37. @
  38. text
  39. @// This may look like C code, but it is really -*- C++ -*-
  40. // 
  41. // Copyright (C) 1988 University of Illinois, Urbana, Illinois
  42. //
  43. // written by Dirk Grunwald (grunwald@@cs.uiuc.edu)
  44. //
  45. #ifndef AWESIMEH
  46. #define AWESIMEH
  47.  
  48. //
  49. //    Awesime.h
  50. //
  51. //    Awesime is a component of the Discret Event Simulation Environment.
  52. //    The major purpose of Awesime is to provide a virtual function
  53. //    resetInternalState which is used to reset a simulation.
  54. //    In addition, each Awesime can provide a function 'reportState' which
  55. //    lists the current state of that simulation component in a standard
  56. //    format.
  57. //
  58. //    These virtuals are used to implement Resetables and Reportables,
  59. //    and the Awesime serves to define a simulation environment.
  60. // 
  61.  
  62. #include <stream.h>
  63.  
  64. #ifdef __GNUG__
  65. #include <std.h>
  66. #else
  67.  
  68. #ifndef TRUE                    // disable if already done #define TRUE 1...
  69. #ifndef bool
  70. enum bool   
  71. {           
  72.   FALSE = 0,
  73.   TRUE  = 1              
  74. };
  75. #endif
  76. #endif
  77.  
  78. #include "Pragma.h"
  79.  
  80. PRAGMA_LINKAGE_C
  81.  
  82. #include "libc.h"
  83. // #include "stdlib.h"
  84. #include "osfcn.h"
  85.  
  86. extern void bcopy(void *, void *, int);
  87. extern void bzero(void *, int);
  88.  
  89. PRAGMA_LINKAGE
  90.  
  91. #endif
  92.  
  93. class Awesime;
  94. typedef Awesime *AwesimePtr;
  95. typedef void *VoidPtr;
  96.  
  97. extern const int SubClassResponsibility;
  98.  
  99. class Awesime {
  100. protected:
  101.     int debugFlag;
  102.  
  103. public :
  104.  
  105.     inline Awesime(bool xdebug = 0) {
  106.     debugFlag = xdebug;
  107.     }
  108.     inline ~Awesime(){};
  109.  
  110.     virtual bool debug();
  111.     virtual bool debug(bool x);
  112.  
  113.     virtual void classResetInternalState();
  114.     virtual void classReportState(ostream&);
  115.     virtual void classPrintOn(ostream& s);
  116.     virtual const char* classIsA();
  117.     virtual AwesimePtr classCopy();
  118.     virtual AwesimePtr classDeepCopy();
  119.  
  120.     virtual void subClassResponsibility(char *name = "");
  121. };
  122.  
  123. inline ostream&
  124. operator<<(ostream& strm, const Awesime& ob)
  125. {
  126.     ob.classPrintOn(strm);
  127.     return strm;
  128. }
  129.  
  130. #endif AWESIME
  131. @
  132.  
  133.  
  134. 3.1
  135. log
  136. @Steay version
  137. @
  138. text
  139. @@
  140.  
  141.  
  142. 1.2
  143. log
  144. @*** empty log message ***
  145. @
  146. text
  147. @d40 1
  148. a40 3
  149. #ifdef _CPPTWO_
  150. #pragma linkage C
  151. #endif /*_CPPTWO_*/
  152. d42 2
  153. d47 1
  154. d51 2
  155. a52 3
  156. #ifdef _CPPTWO_
  157. #pragma linkage
  158. #endif /*_CPPTWO_*/
  159. @
  160.  
  161.  
  162. 1.1
  163. log
  164. @Initial revision
  165. @
  166. text
  167. @d1 6
  168. d30 2
  169. d37 2
  170. d81 2
  171. @
  172.